import request from '@/pages/api/index'


/**
 * 获取好友列表
 * @return userLists
 * @method get
 * */
export function getUserList() {
    return request.get(`/rabbitmq/getAllLoginUser`)
}

/**
 * 发送消息
 * @param {{receiveUserId: *, fromUserId: *, topic: *, content: *}} data
 *
 * */
export function sendMessage(data) {
    return request.post(`/rabbitmq/sendToTopic`, data)
}
/**
 * 得到聊天记录
 * @param receiverId 接收者id
 * @param pageSize 条数
 * @param pageNum 页码
 * */
export function getChatRecord(receiverId, pageSize, pageNum) {
    return request.get(`/message/getChatRecord?receiverId=${receiverId}&pageSize=${pageSize}&pageNum=${pageNum}`)
}
